home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / tk_main.z / tk_main
Text File  |  1998-10-30  |  3KB  |  67 lines

  1.  
  2.  
  3.  
  4. TTTTkkkk____MMMMaaaaiiiinnnn((((3333TTTTkkkk))))                                                      TTTTkkkk____MMMMaaaaiiiinnnn((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      Tk_Main - main program for Tk-based applications
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  13.  
  14.      TTTTkkkk____MMMMaaaaiiiinnnn(_a_r_g_c, _a_r_g_v, _a_p_p_I_n_i_t_P_r_o_c)
  15.  
  16. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  17.      int               _a_r_g_c           (in)      Number of elements in _a_r_g_v.
  18.  
  19.      char              *_a_r_g_v[]        (in)      Array of strings containing
  20.                                                 command-line arguments.
  21.  
  22.      Tcl_AppInitProc   *_a_p_p_I_n_i_t_P_r_o_c   (in)      Address of an application-
  23.                                                 specific initialization
  24.                                                 procedure.  The value for this
  25.                                                 argument is usually
  26.                                                 TTTTccccllll____AAAAppppppppIIIInnnniiiitttt.
  27.  
  28.  
  29. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.      TTTTkkkk____MMMMaaaaiiiinnnn acts as the main program for most Tk-based applications.
  31.      Starting with Tk 4.0 it is not called mmmmaaaaiiiinnnn anymore because it is part of
  32.      the Tk library and having a function mmmmaaaaiiiinnnn in a library (particularly a
  33.      shared library) causes problems on many systems.  Having mmmmaaaaiiiinnnn in the Tk
  34.      library would also make it hard to use Tk in C++ programs, since C++
  35.      programs must have special C++ mmmmaaaaiiiinnnn functions.
  36.  
  37.      Normally each application contains a small mmmmaaaaiiiinnnn function that does
  38.      nothing but invoke TTTTkkkk____MMMMaaaaiiiinnnn.  TTTTkkkk____MMMMaaaaiiiinnnn then does all the work of creating
  39.      and running a wwwwiiiisssshhhh-like application.
  40.  
  41.      When it is has finished its own initialization, but before it processes
  42.      commands, TTTTkkkk____MMMMaaaaiiiinnnn calls the procedure given by the _a_p_p_I_n_i_t_P_r_o_c argument.
  43.      This procedure provides a ``hook'' for the application to perform its own
  44.      initialization, such as defining application-specific commands.  The
  45.      procedure must have an interface that matches the type TTTTccccllll____AAAAppppppppIIIInnnniiiittttPPPPrrrroooocccc:
  46.           typedef int Tcl_AppInitProc(Tcl_Interp *_i_n_t_e_r_p);
  47.      _A_p_p_I_n_i_t_P_r_o_c is almost always a pointer to TTTTccccllll____AAAAppppppppIIIInnnniiiitttt; for more details
  48.      on this procedure, see the documentation for TTTTccccllll____AAAAppppppppIIIInnnniiiitttt.
  49.  
  50.  
  51. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  52.      application-specific initialization, command-line arguments, main program
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.